package com.speak;

import java.io.*;

/**
 * @ClassName VoiceSpeak
 * @Description
 * @Author Administrator
 * @Date 2018/10/12 14:26
 **/
public class VoiceSpeak {
    public static void main(String[] args) {

        //输入流
        DataInputStream dis = null;
        FileInputStream fis = null;

        //输出流
        DataOutputStream dos = null;
        FileOutputStream fos = null;
        try {
            fis = new FileInputStream("C:\\Users\\Administrator\\Desktop\\111.wav");
            dis = new DataInputStream(fis);

            fos = new FileOutputStream("C:\\Users\\Administrator\\Desktop\\222.wav");
            dos = new DataOutputStream(fos);
            StringBuffer sb = new StringBuffer();
            int temp;
            /*while ((temp = dis.read()) != -1) {
                dos.write(temp);
                sb.append(temp);
            }*/
            dos.write(248215231);
            dos.write(9225588);
            dos.write(251232);
            dos.write(248168);
            System.out.println(sb);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                dos.close();
                fos.close();
                dis.close();
                fis.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
